/**
 * 作者：陈文斌 on 2019/1/13.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';
import 'package:crm/view/AppBar/custom_app_bar.dart';
import 'package:crm/view/Tile/list_tile_text.dart';
import 'package:crm/view/Tile/list_tile_text_field.dart';
import 'package:crm/view/Tile/tile_normal.dart';
import 'package:crm/page/MarketSituation/customer_group_page.dart';

const String Title = '市场方向';

class MarketSituationPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _MarketSituationState();
}

class _MarketSituationState extends State<MarketSituationPage> {
  final TextStyle _titleTextStyle = TextStyle(
    color: AppColors.DetailTextColor,
    fontSize: AppFontSizes.Font15,
    fontFamily: AppFontFamilies.PingFangSC,
    fontWeight: FontWeight.w500,
  );

  final TextStyle _headerTextStyle = TextStyle(
    color: Color(0xFFA1A1A1),
    fontSize: AppFontSizes.Font13,
    fontFamily: AppFontFamilies.PingFangSC,
    fontWeight: FontWeight.w500,
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CustomAppBar(
        title: Title,
      ),
      body: GestureDetector(
        onTap: () {
          FocusScope.of(context).requestFocus(FocusNode());
        },
        child: ListView(
          children: <Widget>[
            PaddingSet.PaddingTop(10),
            ListTileTextField(
              title: Text(
                '扩展方向',
                style: _titleTextStyle,
              ),
              content: '',
            ),
            ListTileTextField(
              title: Text(
                '销售团队',
                style: _titleTextStyle,
              ),
              content: '',
              hintText: '请输入  人',
            ),
            ListTileTextField(
              title: Text(
                '企业规模',
                style: _titleTextStyle,
              ),
              content: '请输入  人',
            ),
            ListTileTextField(
              title: Text(
                '网址',
                style: _titleTextStyle,
              ),
              content: '',
            ),
            TileNormal(
              title: Text(
                '主要市场',
                style: _headerTextStyle,
              ),
            ),
            ListTileText(
              title: Text(
                '国内客户群体',
                style: _titleTextStyle,
              ),
              content: '',
              onTap: () => Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => CustomerGroupPage(
                            okCallback: (customerGroupContent) {
                              print('${customerGroupContent}');
                            },
                          ),
                    ),
                  ),
            ),
            ListTileText(
              title: Text(
                '国际客户群体',
                style: _titleTextStyle,
              ),
              content: '',
              onTap: () => Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => CustomerGroupPage(
                            okCallback: (customerGroupContent) {
                              print('${customerGroupContent}');
                            },
                          ),
                    ),
                  ),
            ),
          ],
        ),
      ),
    );
  }
}
